from  time import sleep
from selenium import webdriver
driver=webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(10)
driver.get('https://www.baidu.com/')
sleep(1)
driver.back()    #返回
sleep(2)
driver.forward()   #前进
sleep(2)
driver.find_element_by_class_name('s_ipt').send_keys('我的家乡')
sleep(2)
driver.refresh()     #刷新浏览器
sleep(3)

driver.quit()        #结束